CREATE TEMPORARY TABLE ERROR: MySQL server has gone away